<div class="bjui-pageHeader" style="background-color: #fefefe; border-bottom: none;">
    <form action="/admin/administration/policy/notice-policy-list" data-toggle="ajaxsearch" id="findglobalform" data-options="{
    validate:false,
    searchDatagrid:$.CurrentNavtab.find('#notice-policy-list'),

    }">
        <fieldset>
            <legend style="font-weight:normal;">搜索：</legend>
            <div style="margin:0; padding:1px 5px 5px;">
                <span>标题:</span>
                <input name="title" size="10">&nbsp;
                <span>类型:</span>
                <select name="type" data-toggle="selectpicker">
                    <option value="">全部</option>
                    <option value="1">新闻</option>
                    <option value="2">政策</option>
                </select>


                <div class="btn-group">
                    <button type="submit" class="btn-green" data-icon="search">查询！</button>

                </div>
            </div>
        </fieldset>
    </form>
</div>
<div class="bjui-pageContent">
    <table class="table table-bordered" id="notice-policy-list" data-toggle="datagrid" data-options="{
    height: '100%',
    showToolbar: true,
    fullGrid:true,
    filterThead:false,
    fieldSortable:false,
    columnMenu:false,
    local: 'remote',
    dataUrl:'/admin/administration/policy/notice-policy-list',
    editUrl:'/admin/administration/policy/notice-policy-list',
    toolbarCustom: toolbar,
    linenumberAll: true
}">
        <thead>
        <th data-options="{name:'title',align:'center',width:70}">标题</th>

        <th data-options="{name:'type',align:'center',width:70,items:[{'0':'不明'},{'1':'新闻'},{'2':'政策'}]}">类型</th>
        <th data-options="{align:'center',render:operationColumn}">操作</th>
        </thead>
    </table>
</div>
<script>
    function operationColumn(value, data) {
        var html = '<button type="button" class="btn btn-green" data-toggle="navtab" data-options="{id:\'notice-policy-edit\', url:\'/admin/administration/policy/notice-policy-edit\', mask:true, width:900, height:400, title:\'编辑新闻政策\', data:{id:' + data.id + '}}"><i class="fa fa-edit"></i>编辑</button>';

        html += '<button type="button" class="btn btn-red" data-toggle="doajax" data-options="{id:\'del-notice-policy\', url:\'/admin/administration/policy/del-notice-policy\', confirmMsg:\'确定删除？\', fresh:true, title:\'解绑角色\', mask:true, data:{id:' + data.id + '}}"> 删除</button>';
//        html += '<button type="button" class="btn btn-red bjui-datagrid-btn delete"  data-toggle="del.datagrid.tr" ><i class="fa fa-remove"></i>删除</button>';
        return html;
    }
    function toolbar() {
        var html = '<button type="button" class="btn btn-blue"  data-toggle="navtab" data-options="{id:\'water-bill-add\', url:\'/admin/administration/policy/notice-policy-add\', title:\'添加新闻政策\',width:900,height:400,data:{addFlag:1}, mask:true}"><i class="fa fa-plus"></i> 添加</button>';
        return html;
    }


</script>